import os
import time

def chk_signal(fdate,prod):
	sig_path="z://data//signal//"
	sig = sig_path + fdate + "//prod" + prod + ".netvalue.signal"
	if os.path.exists(sig):
		return True
	else:
		print(sig+ "file not existed")
		return False

def begin_chk(fdate,prod_str):
	prodlist = prod_str.split(',')
	send_flag = 0
	for prod in prodlist:
		while True:
			if chk_signal(fdate,prod) == False:
				time.sleep(30)
			else:
				return 0

if __name__ == "__main__":
	begin_chk(fdate = "20151012")
